package com.qs.core.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the gen_person_details database table.
 * 
 */
@Entity
@Table(name="gen_person_details")
public class GenPersonDetail implements Serializable {
	private static final long serialVersionUID = 1L;
	private String personId;
	private String createdBy;
	private Date createdDt;
	private Date dob;
	private String firstName;
	private String gender;
	private String lastName;
	private String maritalStatus;
	private String middleName;
	private String ssn;
	private String suffix;
	private String updatedBy;
	private Date updatedDt;
	private List<GenApplicantInfo> genApplicantInfos;
	private GenPersonDetail genPersonDetail1;
	private List<GenPersonDetail> genPersonDetails1;
	private GenPersonDetail genPersonDetail2;
	private List<GenPersonDetail> genPersonDetails2;

    public GenPersonDetail() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="PERSON_ID")
	public String getPersonId() {
		return this.personId;
	}

	public void setPersonId(String personId) {
		this.personId = personId;
	}


	@Column(name="CREATED_BY")
	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="CREATED_DT")
	public Date getCreatedDt() {
		return this.createdDt;
	}

	public void setCreatedDt(Date createdDt) {
		this.createdDt = createdDt;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="DOB")
	public Date getDob() {
		return this.dob;
	}

	public void setDob(Date dob) {
		this.dob = dob;
	}


	@Column(name="FIRST_NAME")
	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}


	@Column(name="GENDER")
	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}


	@Column(name="LAST_NAME")
	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}


	@Column(name="MARITAL_STATUS")
	public String getMaritalStatus() {
		return this.maritalStatus;
	}

	public void setMaritalStatus(String maritalStatus) {
		this.maritalStatus = maritalStatus;
	}


	@Column(name="MIDDLE_NAME")
	public String getMiddleName() {
		return this.middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}


	@Column(name="SSN")
	public String getSsn() {
		return this.ssn;
	}

	public void setSsn(String ssn) {
		this.ssn = ssn;
	}


	@Column(name="SUFFIX")
	public String getSuffix() {
		return this.suffix;
	}

	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}


	@Column(name="UPDATED_BY")
	public String getUpdatedBy() {
		return this.updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="UPDATED_DT")
	public Date getUpdatedDt() {
		return this.updatedDt;
	}

	public void setUpdatedDt(Date updatedDt) {
		this.updatedDt = updatedDt;
	}


	//bi-directional many-to-one association to GenApplicantInfo
	@OneToMany(mappedBy="genPersonDetail", fetch=FetchType.EAGER)
	public List<GenApplicantInfo> getGenApplicantInfos() {
		return this.genApplicantInfos;
	}

	public void setGenApplicantInfos(List<GenApplicantInfo> genApplicantInfos) {
		this.genApplicantInfos = genApplicantInfos;
	}
	

	//bi-directional many-to-one association to GenPersonDetail
    @ManyToOne
	@JoinColumn(name="SPOUSE_ID")
	public GenPersonDetail getGenPersonDetail1() {
		return this.genPersonDetail1;
	}

	public void setGenPersonDetail1(GenPersonDetail genPersonDetail1) {
		this.genPersonDetail1 = genPersonDetail1;
	}
	

	//bi-directional many-to-one association to GenPersonDetail
	@OneToMany(mappedBy="genPersonDetail1", fetch=FetchType.EAGER)
	public List<GenPersonDetail> getGenPersonDetails1() {
		return this.genPersonDetails1;
	}

	public void setGenPersonDetails1(List<GenPersonDetail> genPersonDetails1) {
		this.genPersonDetails1 = genPersonDetails1;
	}
	

	//bi-directional many-to-one association to GenPersonDetail
    @ManyToOne
	@JoinColumn(name="PARENT_ID")
	public GenPersonDetail getGenPersonDetail2() {
		return this.genPersonDetail2;
	}

	public void setGenPersonDetail2(GenPersonDetail genPersonDetail2) {
		this.genPersonDetail2 = genPersonDetail2;
	}
	

	//bi-directional many-to-one association to GenPersonDetail
	@OneToMany(mappedBy="genPersonDetail2", fetch=FetchType.EAGER)
	public List<GenPersonDetail> getGenPersonDetails2() {
		return this.genPersonDetails2;
	}

	public void setGenPersonDetails2(List<GenPersonDetail> genPersonDetails2) {
		this.genPersonDetails2 = genPersonDetails2;
	}
	
}